
/// @file Strcut to manage an Executable

#ifndef NOSAL_EXEC_INTERNAL_EXECUTABLE_H_
#define NOSAL_EXEC_INTERNAL_EXECUTABLE_H_

#include "startup_configuration.h"
#include "config/execution_manifest.h"
#include "filesystem.h"

#include <vector>

namespace netaos {
namespace nosal {
namespace exec {
namespace internal {

//// @brief The Executable struct represents Process from the meta-model.
struct Executable
{
    explicit Executable(config::ExecutionManifest&& manifest,
        const std::string& executable_dir,
        const std::string& executable_path)
        : executable_dir_(executable_dir)
        , executable_path_(executable_path)
        , executable_name_(Filesystem::ExtractFileName(std::string(executable_path.c_str())))
        , manifest_(std::move(manifest))
    { }

    std::string executable_dir_;
    std::string executable_path_;
    std::string executable_name_;
    config::ExecutionManifest manifest_;
    std::vector<std::shared_ptr<StartupConfiguration>> startup_configurations_;
};

}  // namespace internal
}  // namespace exec
}  // namespace nosal
}  // namespace netaos

#endif  // NOSAL_EXEC_INTERNAL_EXECUTABLE_H_
